/**
 * Copyright (C) Sarah Mount, 2008.
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 *
 **/
includes SampleMsg;
configuration DingoBoom { }
implementation
{
  components GenericComm as Comm;
  components Main, DingoBoomM, TimerC, LedsC;
  components AccelDriverC, MSP430InterruptC, InternalTempC, VoltageC;
  components new MainControlC() as PhotoControl, PhotoDriverC;
  components new MainControlC() as AccelControl;
  components new MainControlC() as MicControl, MicDriverC;

  Main.StdControl -> DingoBoomM;
  Main.StdControl -> Comm;
  
  // Wiring for sensors
  PhotoControl.SplitControl  -> PhotoDriverC;				// Light meter
  DingoBoomM.Photo           -> PhotoDriverC;
  AccelControl.SplitControl  -> AccelDriverC;				// Accelerometer
  DingoBoomM.AccelY          -> AccelDriverC.AccelY;
  DingoBoomM.AccelX          -> AccelDriverC.AccelX;
  DingoBoomM.Button          -> MSP430InterruptC.Port27;	// User button
  DingoBoomM.InternalTemp    -> InternalTempC;				// Temperature sensor
  DingoBoomM.InternalVoltage -> VoltageC;					// Internal voltameter 
  MicControl.SplitControl    -> MicDriverC;					// Microphone
  DingoBoomM.Microphone      -> MicDriverC;
  
  // Wiring for generic components
  DingoBoomM.SendSampleMsg -> Comm.SendMsg[AM_SAMPLEMSG];  
  DingoBoomM.SampleTimer   -> TimerC.Timer[unique("Timer")];
  DingoBoomM.Leds          -> LedsC;
  DingoBoomM.CommControl   -> Comm;
}
